﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using App.Lib.Service;
using App.Lib.Service.Impl;

namespace App.WinForm
{
	public partial class Form1 : Form
	{
		private IWeekFunction weekfunction;
		public Form1()
		{
			InitializeComponent();
		}

		private void button1_Click(object sender, EventArgs e)
		{
			this.txtShow.Text = weekfunction.GetWorktimeInThisWeek(DateTime.Now);
		}

		private void button2_Click(object sender, EventArgs e)
		{
			this.txtShow.Text = this.weekfunction.GetWorktimeInNextWeek(DateTime.Now);
		}

		private void Form1_Load(object sender, EventArgs e)
		{
			weekfunction = new WeekFunction();

		}

		private void button4_Click(object sender, EventArgs e)
		{
			this.txtShow.Text = "";
		}

		private void button3_Click(object sender, EventArgs e)
		{
			Clipboard.SetDataObject(this.txtShow.Text.Trim());
		}

		private void button5_Click(object sender, EventArgs e)
		{
			this.txtShow.Text = this.weekfunction.GetWorktimeInThisWeek(this.monthCalendar1.SelectionStart);
		}
	}
}
